﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 版权所有 (c) 2022   保留所有权利。
 * CLR版本：4.0.30319.42000
 * 机器名称：DESKTOP-UL84BU5
 * 公司名称：
 * 命名空间：KingerRobot.WanliWMS.Spi
 * 唯一标识：c22506ad-0039-4ea3-aa79-f89867846ee3
 * 文件名：IMaterialManage
 * 当前用户域：DESKTOP-UL84BU5
 * 
 * 创建者：zzl
 * 电子邮箱：1003590782@qq.com
 * 创建时间：2022/7/4 10:44:13
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace KingerRobot.MexicoSailunWMS.Spi;

public interface IMaterialManageService
{
    /// <summary>
    /// 修改启用标识
    /// </summary>
    /// <param name="para"></param>
    /// <returns></returns>
    int UpdateMaterialUseFlag(MaterialExpirPara para, long userId, string userName, string clientHost = "");
    /// <summary>
    /// 查询 同步MES系统中的物料信息
    /// </summary>
    /// <param name="materialPara"></param>
    /// <returns></returns>
    List<MaterialBean> GetMaterialBeans(MaterialPara materialPara);

    /// <summary>
    /// 按照物料设置过期时间（小时）
    /// </summary>
    /// <param name="materialExpirPara"></param>
    /// <returns></returns>
    int UpdateMaterialExpir(MaterialExpirPara materialExpirPara);
    /// <summary>
    /// 维护入库比例
    /// </summary>
    /// <param name="materialExpirPara"></param>
    /// <returns></returns>
    int UpdateMaterialCheck(MaterialCheckPara materialExpirPara, long userId, string userName, string clientHost);

    /// <summary>
    /// 物料 内外径，胎高 更改
    /// </summary>
    /// <param name="condition"></param>
    /// <returns></returns>
    int UpdateMaterialProperty(UpdateMaterialPropertyCondition condition, long userId, string userName, string clientHost);


    int UpdateMaterialHeight(long id, decimal height);
    /// <summary>
    /// 获取物料硫化信息
    /// </summary>
    /// <param name="num">硫化模具小时生产量,通过输入框进行输入（可为小数），用于计算使用，默认值为3</param>
    /// <returns></returns>
    List<MaterialCuringInfo> GetMaterialCuringList(decimal num);


    /// <summary>
    /// 获取库存中物料数量
    /// </summary>
    /// <param name="materialCode">物料编码</param>
    /// <returns></returns>
    List<StockMaterialCount> GetStockMaterialCountList(StockMaterialCountPara parm);//

}
public class StockMaterialCountPara
{
    public string materialCode { get; set; }
}
public class StockMaterialCount
{
    public string MaterialCode { get; set; }

    public string MaterialName { get; set; }
    public int Count { get; set; }
}

/// <summary>
/// 硫化模具小时生产量,通过输入框进行输入（可为小数），用于计算使用，默认值为3
/// </summary>
public class MaterialCuringInfo
{
    /// <summary>
    /// 胎胚库中的胎胚规格
    /// </summary>
    public string MaterialCode { get; set; }
    /// <summary>
    /// 立体胎胚库中胎胚规格对应的胎胚数量
    /// </summary>
    public int StockCount { get; set; }
    /// <summary>
    /// 平面胎胚库中胎胚规格对应的胎胚数量，需MES增加接口
    /// </summary>
    public int MesCount { get; set; }
    /// <summary>
    /// 对应规格的硫化生产机台模具数量
    /// </summary>
    public int CuringCount { get; set; }
    /// <summary>
    /// 硫化机台生产相应胎胚所需的时间数（按小时）=（立库胎胚数量+平库胎胚数量）/硫化模具数*24*60/硫化平均时长
    /// </summary>
    public decimal CuringTime { get; set; }
    /// <summary>
    /// 对应规格每小时硫化数量
    /// </summary>
    public decimal? Quantity { get; set; }

}

public class MaterialExpirPara
{
    public long Id { get; set; }
    /// <summary>
    /// 过期时间(小时)
    /// </summary>
    public int Expir { get; set; }
}
public class MaterialCheckPara
{
    public long Id { get; set; }
    /// <summary>
    /// 抽检比例
    /// </summary>
    public int Ration { get; set; }
}
public class MaterialPara
{
    /// <summary>
    /// Spec 码
    /// </summary>
    public string Spec { get; set; }
    /// <summary>
    /// 物料编号
    /// </summary>
    public string MaterialCode { get; set; }

    /// <summary>
    /// 物料名称
    /// </summary>
    public string MaterialName { get; set; }

    /// <summary>
    /// 是否可用
    /// </summary>
    public int? UseFlag { get; set; }
}
public class MaterialBean
{
    public long? Id { get; set; }
    /// <summary>
    /// Spec 码
    /// </summary>
    public string Spec { get; set; }
    /// <summary>
    /// 物料编号
    /// </summary>
    public string MaterialCode { get; set; }
    /// <summary>
    /// 物料名称
    /// </summary>
    public string MaterialName { get; set; }
    /// <summary>
    /// 英寸
    /// </summary>
    public string Inch { get; set; }
    /// <summary>
    /// 轮胎外径
    /// </summary>
    public decimal? OutsideDiameter { get; set; }
    /// <summary>
    /// 轮胎子口(内径)
    /// </summary>
    public decimal? InsideDiameter { get; set; }
    /// <summary>
    /// 胎胚高度
    /// </summary>
    public decimal? MaterialHeight { get; set; }
    /// <summary>
    /// 重量
    /// </summary>
    public decimal? MaterialWeight { get; set; }
    /// <summary>
    /// 重量上限
    /// </summary>
    public decimal? WeightUpper { get; set; }
    /// <summary>
    /// 重量下限
    /// </summary>
    public decimal? WeightLower { get; set; }
    /// <summary>
    /// 单位
    /// </summary>
    public string Unit { get; set; }
    /// <summary>
    /// 使用与否
    /// </summary>
    public string Useyn { get; set; }
    /// <summary>
    /// 过期时间（小时）
    /// </summary>
    public int? ExpirDuration { get; set; }
    /// <summary>
    /// 入库比例
    /// </summary>
    public int? InRation { get; set; }
    /// <summary>
    /// 启用
    /// </summary>
    public bool UseFlag { get; set; }
    public DateTime? CreateTime { get; set; }
}


/// <summary>
/// 物料 内外径 高度 更改
/// </summary>
public class UpdateMaterialPropertyCondition
{

    public long? Id { get; set; }//id，用来查找指定的物料

    public string OutSideDiameter { get; set; }//外径

    public string InSideDiameter { get; set; }//内径

    public string MaterialHeight { get; set; }//胎高

}